/*
 *  Copyright 2004 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.webapp.form.core;

import com.blandware.atleap.webapp.form.BaseForm;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>ActionForm bean that holds layout definition and action page id
 * to use when switchng from one layout to another in list of menu items</p>
 * <p><a href="SwitchActionPageLayoutForm.java.html"><i>View Source</i></a></p>
 *
 * @author Sergey Zubtsovskiy <a href="mailto:sergey.zubtsovskiy@blandware.com">&lt;sergey.zubtsovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.5 $ $Date: 2006/08/03 10:08:06 $
 * @struts.form name="switchActionPageLayoutForm"
 */
public class SwitchActionPageLayoutForm extends BaseForm {

	protected String layoutDefinition;
	protected String actionPageId;

	/**
	 * Creates the new instance of SwitchActionPageLayoutForm
	 */
	public SwitchActionPageLayoutForm() {
	}

    /**
     * Returns layout definition
     *
     * @return layout definition
     */
	public String getLayoutDefinition() {
		return layoutDefinition;
	}

    /**
     * Sets layout definition
     *
     * @param layoutDefinition layout definition to set
     */
	public void setLayoutDefinition(String layoutDefinition) {
		this.layoutDefinition = layoutDefinition;
	}

    /**
     * Returns action page ID
     *
     * @return action page ID
     */
	public String getActionPageId() {
		return actionPageId;
	}

    /**
     * Sets action page ID
     *
     * @param actionPageId action page ID to set
     */
	public void setActionPageId(String actionPageId) {
		this.actionPageId = actionPageId;
	}

	/**
	 * Resets all properties to their default values
	 *
	 * @param mapping The ActionMapping used to select this instance
	 * @param request The non-http request we are proceeding
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
		layoutDefinition = null;
		actionPageId = null;
	}

	/**
	 * Form validation -- this form is always valid
	 *
	 * @param mapping The ActionMapping used to select this instance
	 * @param request The non-http request we are proceeding
	 * @return Instance of ActionErrors contains all validation errors
	 */
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
		return null;
	}
}